# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=scrot
pkgver=1.7
pkgrel=0
pkgdesc="Simple command-line screenshot utility for X"
options="!check" # No testsuite
url="https://github.com/resurrecting-open-source-projects/scrot"
arch="all"
license="MIT"
subpackages="$pkgname-doc"
makedepends="automake autoconf autoconf-archive bsd-compat-headers imlib2-dev
	libtool libx11-dev libxcomposite-dev libxfixes-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/resurrecting-open-source-projects/scrot/archive/$pkgver.tar.gz"

prepare() {
	default_prepare
	autoreconf -fi
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man
	make
}

package() {
	make DESTDIR="$pkgdir" docsdir=/usr/share/doc/scrot install
}

sha512sums="
9f9a29b69e9c216bad7c6028fe0043b2729393a716dccc1389665cf1e9496a6f1d370b97a7c8432b31af7d69477b4fc1d41dffd4ca2a78a49bb98e908975612f  scrot-1.7.tar.gz
"
